using System;

public class PlayerEvents
{
    public static event Action<float, float> onUpdateHP;
    public static event Action<float> onUpdateDodgeCD;
    public static event Action<int> onUpdateCoin;

    //更新血条UI事件
    public static void UpdateHP(float currentHealth, float maxHealth) 
    {
        onUpdateHP?.Invoke(currentHealth, maxHealth);
    }
    
    //更新闪避CD事件
    public static void UpdateDodgeCD(float dodgeCooldown) 
    {
        onUpdateDodgeCD?.Invoke(dodgeCooldown);
    }

    //更新金币事件
    public static void UpdateCoin(int count) 
    {
        onUpdateCoin?.Invoke(count);
    }
}
